﻿//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1998-2024 Glodon Company Limited.
//
// Licensed under the MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the “Software”),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//////////////////////////////////////////////////////////////////////////////
#pragma once
#include "IUserDragEventData.h"
#include "GbmpUiPlatform.h"
#include "IUserDragEventHandler.h"

namespace gcmp
{
    class IUserDragEventArgs;
    /// \brief 测试用户拖放事件数据
    class GBMP_UI_PLATFORM_EXPORT TestDragEventData : public IUserDragEventData
    {
    public:
        TestDragEventData();
        virtual ~TestDragEventData();
        /// \brief 数据有效性检测与设置接口
        virtual bool IsDataValid(int uiViewId) override;
        /// \brief 设置图片提示信息
        void SetPicturePath(const std::wstring& path);
        /// \brief 获得图片提示信息
        virtual const std::wstring& GetPicturePath() const override;
        /// \brief 设置文字提示信息
        void SetText(const std::wstring& tip);
        /// \brief 获得文字提示信息
        virtual const std::wstring& GetText() const  override;

        void SetFamilyName(const std::wstring& familyName);
        const std::wstring& GetFamilyName() const;

        void SetFamilyType(const std::wstring& familyType);
        const std::wstring& GetFamilyType() const;
    private:
        std::wstring m_picturePath;
        std::wstring m_text;
        std::wstring m_familtName;
        std::wstring m_familyType;


    };

    class GBMP_UI_PLATFORM_EXPORT TestDropEventHandler : public IUserDragEventHandler
    {
    public:
        TestDropEventHandler();

        virtual ~TestDropEventHandler();

        virtual void On(IUserDragEventArgs* pArgs) override;
    };
}

